/*Simplex.java Contains a main method. Branch: master
Copyright (C) 2013  Dmytro Kostiantynovskyi, HartLi

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/
import java.util.ArrayList;


public class Simplex {
	public static void main(String[] args) throws InterruptedException {
		ArrayList<String> lstHeader = FileReader.getFileStrings(Config.relativeInstallPath+Config.headerInformation);
		for(int i = 0; i < lstHeader.size(); i++)
			System.out.println(lstHeader.get(i));
		ProcessManager pm = new ProcessManager();
		Thread thrGetInput = new Thread(pm.input);
		pm.startServer();
		ArrayList<ArrayList<String>>  lang = initLang();
		Thread.sleep(10000);
		Missions miss = new Missions();
		Thread thrRotation = new Thread(miss.rotation);
		thrRotation.start();
		Thread.sleep(10000);
		
		thrGetInput.start();
		EventlogRead elr = new EventlogRead(lang);
		Thread thrEvents = new Thread(elr.run);
		thrEvents.start();
	}

	private static ArrayList<ArrayList<String>>  initLang(){
		Localization loc = new Localization();
		loc.loadLocalization();
		ArrayList<ArrayList<String>>  lang = loc.getLang();
		
		return lang;
	}
}
